package com.wms.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private int code;
    private String msg;
    private Object data;
    public static Result success() {
        return new Result(200, "访问成功", null);
    }
    public static Result success(Object obj) {
        return new Result(200, "访问成功", obj);
    }
    public static Result success(String msg,Object obj) {
        return new Result(200, msg, obj);
    }
    public static Result fail(int code,String msg) {
        return new Result(code, msg, null);
    }
}
